import { pget, ppostJson } from '@/utils/req';
import { modalApi } from '@/utils/modalReq';

// 查询盘点列表 
export function getstocktakeList(query?: any) {
  return pget(`${modalApi.carMessage}/stocktake/page`, query);
}

/**
 * /common/full-stocktake/list
 * /common/stocktake/list
 * @param query 通用查询盘点列表id
 * @returns 
 */
export function getstocktakeCommon(query?: any) {
  return pget(`${modalApi.carMessage}/common/full-stocktake/list`, query);
}

/**
 * 
 * @param query 查询盘点详情
 * @returns 
 */
export function getstocktakeInfo(query?: any) {
  return pget(`${modalApi.carMessage}/stocktake/info`,query);
}

/**
 * 
 * @param data 启用禁用
 * @returns 
 */
export function startstauts(data: any) {
  return ppostJson(`${modalApi.carMessage}/stocktake/update/status`, data);
}
/**
 * 
 * @param data JSon
 * @returns 新建盘点表
 */
export function stocktakeCreate(data: any) {
  return ppostJson(`${modalApi.carMessage}/stocktake/create`, data);
}
/**
 * 
 * @param data 修改盘点表接口
 * @returns 
 */
export function stocktakeUpdate(data: any) {
  return ppostJson(`${modalApi.carMessage}/stocktake/update`, data);
}

/**
 * 
 * @param data 盘点预览列表 
 * @returns 
 */
export function stocktakePreview(data: any) {
  return ppostJson(`${modalApi.carMessage}/stocktake-data-list/preview`, data);
}